perm filename TESMAC.POX[POX,WD] blob sn#363242 filedate 1978-06-18 generic text, type T, neo UTF8
\|\\;				Define Brick Character
\;
\;
\;			       Define Fonts
\;
\M0FIX25;\;	fixed font
\M1SAIL25;\;	light
\M2SAIL25;\;	italic
\;\M3BAXB30;\;	bold
\;\M4CLAR40;\;	title font
\M5SAIL25;\;	subtitle font
\M6SAIL25;\;	superscript and subscript font
\;\M7ZERO30;\;	accents
\;\M8GRFX25;\;	graphics font
\;\M9CORON;\;	font for names of sets
\MAMATH30;\;	mathematical font
\;\MBFIX20;\;	small fixed font
\;\MCGRK30;\;	Greek
\;
\F0\;		select font 0
\;
\;
\;                           Page Dimensions
\;
\←=200;\→L\;		left margin
\←=1510;\→R\;		right margin
\e=2200;\;		set length of page
\T=200;\;		set top of page
\B=2000;\;		set bottom of page
\;
\;				 Assembly Flags
\;
\∞SUMMARYFLAG[\←=0;]\;	print summaries
\∞REMARKFLAG[\←=0;]\;	print remarks
\∞REVNOTEFLAG[\←=1;]\;	print notes to reviewer
\∞RUNTITFLAG[\←=1;]\;	print running titles
\;
\;
\;				 Dynamic Flags
\;
\∞INSECFLAG[\←=0;]\;	inside a section ?
\;
\;
\;			      Special Feature Bits
\;
\⊂'000001;\;	VERHHR - H and h height of font pseudo-register
\;	\⊂'000002;\;	VERTRC - trace and other tty output
\⊂'000004;\;	VERSIM - linefeed simulator
\⊂'000010;\;	VERSGK - double gap after period and colon
\⊂'000040;\;	VERREM - REM's syntax for macros with args definitions
\⊂'000100;\;	VEREVE - turn on EVERYPAGE macro
\⊂'000400;\;	VERRHT - modified way to pass args with nest chars
\⊂'010000;\;	VERPAG - automatic page change
\⊂'100000;\;	VERESC - in body of macro, \ converted to <brick> token
\⊂'200000;\;	VERXX1 - correct output overlay
\;	\⊂'1000002;\;	VE1OPN - print output page numbers
\;	\⊂'1000040;\;	VE1FAI - FAIL error mode
\;
\;
\@NUMER.POX[POX,WD];\;		read in numeric macros
\;
\@STRING.POX[POX,WD];\;		read in file of string macros
\;
\;
\@ROMLET.POX[POX,WD];\;		read roman and letter conversions
\;
\@DATE.POX[POX,WD];\;		read in date macros
\;
\∞EVERYPAGE[\N
\	;\P\N				save ac
\	;\!INCR(PAGNUM);\N		increment global page #
\	;\←U\+=1;\→U\N			increment local page #
\;\	;\!INSECFLAG;\?SECPAGNUM(\DS,\DU);\N
\	;\N				print sec and pag nums ?
\	;\oABSPAG{0\!PAGNUM;}\N		global page # overlay
\;\	;\&DATPAG←DATIM&ABSPAG;\N	join it with date overlay
\	;\WABSPAG,=800;=2100;\N		print absolute page overlay
\	;\∂←ABSPAG;\N			expunge abspag overlay
\	;\p]\;				restore ac
\;
\;
\8SECPAGNUM(SEC,PAG)[\N
\	;\oPAGNO{0\!ROMAN(⊗SEC⊗);-⊗PAG⊗}\N	construct local page overlay
\	;\WPAGNO,=800;=2100;\N			print local page overlay
\	;\!EVAL((\∂←)PAGNO(;));]\;		expunge local page overlay
\;
\;
\@MISMAC.POX[POX,WD];\;		load miscellaneous macros
\;
\∞PARA[       ]\;			nojust paragraph
\∞EP[]\;				end paragraph
\;
\;			     Font Selection Macros
\;
\;\8DF(STR)[\!UNDERLINE(⊗STR⊗);]\;		font for defined terms
\8DF(STR)[\[=2;=2;⊗STR⊗\]]\;
\;
\8ORD(STR)[⊗STR⊗]\;		ordinal notation
\;
\@SECT.POX[POX,WD];\;		read in section and subsectin stuff
\;
\;then ammend some definitions
\;
\8SECT(NAME,TIT)[\N		section macro
\	;\P\Q0\N			save ac and reg 0
\	;\∂←INSECFLAG;\N		expunge old INSECFLAG
\	;\∞INSECFLAG[\←=1;]\N		turn on INSECFLAG
\	;\←S\+=1;\→S\N			increment section number
\	;\←'0;\→U\N			set local page # to 0
\	;\←'0;\→F\N			set formula # to 0
\	;\←'0;\→J\N			set illustration # to 0
\	;\←'0;\→T\N			set subsec # to 0
\	;\F1\N				reset font to #1
\	;\!LOADAC(PAGNUM);\N		load ac with pagnum
\	;\!ISACODD;\N
\	;\?INCR(PAGNUM);\N
\	;\!EVAL((\∞)⊗NAME⊗(SECNUM[)\DS(]));\N
\	;\N				store section #
\	;\!EVAL((\m{
)\!ROMAN(\DS);( - )\!CAPALL(⊗TIT⊗);(	)\!LOADAC(PAGNUM);\+=1;\D∀(
)(}));\N						type sect title
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\!EVAL((\==1;{)\!ROMAN(\DS);(.)(}));\N
\	;\!LENGTH(\!ROMAN(\DS););\N	length of secnum to ac
\	;\¬=8;\N			sub from indentation
\	;\-=1;\N			sub1 for "."
\	;\!EVAL((\==1;{)\ISPACE;\!CAPALL(⊗TIT⊗);(}));\N
\	;\←R\N				put right marg in ac
\	;\-L\N				subtract left marg
\	;\#\F0\/w \G\N			div by fnt wdth to get linel
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(⊗TIT⊗);\N		length of title to ac
\	;\¬0\N				sub from linelength
\	;\-=8;\N			sub length of tab
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(\!PAGNUM;);\N		length of pagenum to ac
\	;\¬0\N				sub from linelength
\	;\!EVAL((\==1;{)\ISPACE;\!LOADAC(PAGNUM);\+=1;\D∀(}));\N
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\#\F5\!ROMAN(\DS);    \!CAPALL(⊗TIT⊗);\G\;	print section header
\	;\p]\;						restore ac
\;
\;
\;			 Odd (unnumbered) Section Macro
\;
\8ODDSEC(NAME,TIT)[\P\N					save ac
\	;\←'0;\→U\N					set local page # to 0
\	;\←'0;\→F\N					set form # to 0
\	;\←'0;\→J\N					set illustration # to 0
\	;\←'0;\→T\N					set subsec # to 0
\	;\F1\N						reset font to #1
\	;\!LOADAC(PAGNUM);\N		load ac with pagnum
\	;\!ISACODD;\N
\	;\?INCR(PAGNUM);\N
\	;\!EVAL((\∞)⊗NAME⊗(SECNUM[)\DS(]));\N		store section #
\	;\!EVAL((\m{
)\!CAPALL(⊗TIT⊗);(	)\!LOADAC(PAGNUM);\+=1;\D∀(
)(}));\N						type sect title
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\!EVAL((\==1;{)\!CAPALL(⊗TIT⊗);(}));\N
\	;\←R\N				put right marg in ac
\	;\-L\N				subtract left marg
\	;\#\F0\/w \G\N			div by fnt wdth to get linel
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(⊗TIT⊗);\N		length of title to ac
\	;\¬0\N				sub from linelength
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(\!PAGNUM;);\N		length of pagenum to ac
\	;\¬0\N				sub from linelength
\	;\!EVAL((\==1;{)\ISPACE;\!LOADAC(PAGNUM);\+=1;\D∀(}));\N
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\C\#\F5⊗TIT⊗\G\N				print section header
\	;\p]\;						restore ac
\;
\8SUBSEC(NAME,TIT)[\P\N					save ac
\	;\←T\+=1;\→T\N					increment subsec #
\	;\!EVAL((\∞)⊗NAME⊗(SUBSECSECNUM[)\DS(]));\N	store section #
\	;\!EVAL((\∞)⊗NAME⊗(SUBSECNUM[)\DT(]));\N	store subsec #
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\←=16;\N			length of indent to ac
\	;\!EVAL((\==1;{)\ISPACE;\!CAPALL(⊗TIT⊗);(}));\N
\	;\←R\N				put right marg in ac
\	;\-L\N				subtract left marg
\	;\#\F0\/w \G\N			div by fnt wdth to get linel
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(⊗TIT⊗);\N		length of title to ac
\	;\¬0\N				sub from linelength
\	;\-=16;\N			sub length of indent
\	;\→0\N				store ac in reg 0
\	;\!LENGTH(\!PAGNUM;);\N		length of pagenum to ac
\	;\¬0\N				sub from linelength
\	;\!EVAL((\==1;{)\ISPACE;\!PAGNUM;(}));\N
\	;\!EVAL((\==1;{)\A=13;\A=10;(}));\N
\	;\!CAPALL(⊗TIT⊗);\N		print subsec head

\	;\p]\;							restore ac
\;
\@REF.POX[POX,WD];\;		read in cit and ref stuff
\;
\<=1;PROC.CNT;\;
\;
\;\!EVERYPAGE;\;
\;